<template>
<div id="">
  <div class="div">
    <p @click="close()">X</p>
  </div>
</div>
</template>
<script>
export default {
  methods: {
    close() {
      this.$emit('to-close', "aa")
    }
  }
}
</script>
<style  scoped>
div {
  width: 300px;
  height: 300px;
  background: #ccc;
  position: relative;
}

p {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  background: #999;
  color: #fff;
  border-radius: 50%;
  text-align: center;
}
</style>
